home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / nfs / nfs-serv.2be / nfs-serv / nfs-server-2.2beta16 / nfsd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-18  |  3.8 KB  |  110 lines

  1. /*
  2.  * nfsd.h    This program implements a user-space NFS server.
  3.  *
  4.  * Authors:    Mark A. Shand, May 1988
  5.  *        Rick Sladkey, <jrs@world.std.com>
  6.  *        Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  7.  *
  8.  *        Copyright 1988 Mark A. Shand
  9.  *        This software maybe be used for any purpose provided
  10.  *        the above copyright notice is retained.  It is supplied
  11.  *        as is, with no warranty expressed or implied.
  12.  */
  13.  
  14. #include "system.h"
  15.  
  16. #include "mount.h"
  17. #include "nfs_prot.h"
  18.  
  19. union argument_types {
  20.     nfs_fh            nfsproc_getattr_2_arg;
  21.     sattrargs        nfsproc_setattr_2_arg;
  22.     diropargs        nfsproc_lookup_2_arg;
  23.     nfs_fh            nfsproc_readlink_2_arg;
  24.     readargs        nfsproc_read_2_arg;
  25.     writeargs        nfsproc_write_2_arg;
  26.     createargs        nfsproc_create_2_arg;
  27.     diropargs        nfsproc_remove_2_arg;
  28.     renameargs        nfsproc_rename_2_arg;
  29.     linkargs        nfsproc_link_2_arg;
  30.     symlinkargs        nfsproc_symlink_2_arg;
  31.     createargs        nfsproc_mkdir_2_arg;
  32.     diropargs        nfsproc_rmdir_2_arg;
  33.     readdirargs        nfsproc_readdir_2_arg;
  34.     nfs_fh            nfsproc_statfs_2_arg;
  35. };
  36.  
  37. union result_types {
  38.     attrstat        attrstat;
  39.     diropres        diropres;
  40.     readlinkres        readlinkres;
  41.     readres            readres;
  42.     nfsstat            nfsstat;
  43.     readdirres        readdirres;
  44.     statfsres        statfsres;
  45. };
  46.  
  47. /* Global variables. */
  48. extern union argument_types    argument;
  49. extern union result_types    result;
  50. extern int            need_reinit;
  51. extern int            need_flush;
  52.  
  53. /* Include the other module definitions. */
  54. #include "auth.h"
  55. #include "fh.h"
  56. #include "logging.h"
  57.  
  58. /* Global Function prototypes. */
  59. extern _PRO( void nfs_dispatch,      (struct svc_req *, SVCXPRT *)        );
  60. extern _PRO( void mallocfailed,   (void)                );
  61. extern _PRO( nfsstat fh_getattr,  (nfs_fh *fh, fattr *attr,        \
  62.                     struct stat *stat_optimize,    \
  63.                     struct svc_req *rqstp)        );
  64. extern _PRO( nfsstat fhc_getattr, (fhcache *fhc, fattr *attr,        \
  65.                     struct stat *stat_optimize,    \
  66.                     struct svc_req *rqstp)        );
  67. extern _PRO( nfsstat fh_setattr,  (nfs_fh *fh, sattr *attr,        \
  68.                     struct stat *stat_optimize,    \
  69.                     struct svc_req *, int flags)    );
  70. extern _PRO( nfsstat setattr,     (char *path, sattr *attr,        \
  71.                     struct stat *stat_optimize,    \
  72.                     struct svc_req *, int flags)    );
  73. extern _PRO( RETSIGTYPE reinitialize, (int sig)                );
  74.  
  75. #define SATTR_STAT        0x01
  76. #define SATTR_CHOWN        0x02
  77. #define SATTR_CHMOD        0x04
  78. #define SATTR_SIZE        0x08
  79. #define SATTR_UTIMES        0x10
  80. #define SATTR_ALL        (~SATTR_STAT)
  81.  
  82. #ifndef HAVE_REALPATH
  83. extern _PRO( char *realpath, (const char *path, char *resolved_path)    );
  84. #endif /* HAVE_REALPATH */
  85.  
  86. #ifndef HAVE_STRERROR
  87. extern _PRO( char *strerror, (int errnum)                );
  88. #endif /* HAVE_STRERROR */
  89.  
  90. extern _PRO(int nfsd_nfsproc_null_2,    (void *, struct svc_req *)    );
  91. extern _PRO(int nfsd_nfsproc_getattr_2,    (nfs_fh *, struct svc_req *)    );
  92. extern _PRO(int nfsd_nfsproc_setattr_2,    (sattrargs *, struct svc_req *)    );
  93. extern _PRO(int nfsd_nfsproc_root_2,    (void *, struct svc_req *)    );
  94. extern _PRO(int nfsd_nfsproc_lookup_2,    (diropargs *, struct svc_req *)    );
  95. extern _PRO(int nfsd_nfsproc_readlink_2,(nfs_fh *, struct svc_req *)    );
  96. extern _PRO(int nfsd_nfsproc_read_2,    (readargs *, struct svc_req *)    );
  97. extern _PRO(int nfsd_nfsproc_writecache_2,(void *, struct svc_req *)    );
  98. extern _PRO(int nfsd_nfsproc_write_2,    (writeargs *, struct svc_req *)    );
  99. extern _PRO(int nfsd_nfsproc_create_2,    (createargs *, struct svc_req *));
  100. extern _PRO(int nfsd_nfsproc_remove_2,    (diropargs *, struct svc_req *)    );
  101. extern _PRO(int nfsd_nfsproc_rename_2,    (renameargs *, struct svc_req *));
  102. extern _PRO(int nfsd_nfsproc_link_2,    (linkargs *, struct svc_req *)    );
  103. extern _PRO(int nfsd_nfsproc_symlink_2,    (symlinkargs *, struct svc_req *));
  104. extern _PRO(int nfsd_nfsproc_mkdir_2,    (createargs *, struct svc_req *));
  105. extern _PRO(int nfsd_nfsproc_rmdir_2,    (diropargs *, struct svc_req *)    );
  106. extern _PRO(int nfsd_nfsproc_readdir_2,    (readdirargs *, struct svc_req *));
  107. extern _PRO(int nfsd_nfsproc_statfs_2,    (nfs_fh *, struct svc_req *)    );
  108.  
  109. /* End of nfsd.h. */
  110.